﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;

namespace MINERP.MODEL.GenerateReports
{
    /// <summary>
    /// 账单里用到的DataTable
    /// </summary>
    public class BillDataTable
    {
        /// <summary>
        /// 创建shop_bill表
        /// </summary>
        /// <returns></returns>
        public static DataTable CreateShopBillTitle()
        {
            DataTable table = new DataTable();
            table.Columns.Add("ShopName", typeof(string));
            table.Columns.Add("Tel1", typeof(string));
            table.Columns.Add("ShopId", typeof(int));
            table.Columns.Add("BillOrderCode", typeof(string));
            table.Columns.Add("BillId", typeof(int));
            table.Columns.Add("BillCreateTime", typeof(DateTime));
            return table;

        }
        /// <summary>
        /// bill_detail
        /// </summary>
        /// <returns></returns>
        public static DataTable CreateShopBillDetail()
        {
            DataTable table = new DataTable();
            table.Columns.Add("BillId", typeof(int));
            table.Columns.Add("BillDetailId", typeof(int));
            table.Columns.Add("OrderInfoCode", typeof(string));
            table.Columns.Add("OrderProductName", typeof(string));
            table.Columns.Add("CtmName", typeof(string));
            return table;
        }
        /// <summary>
        /// bil_detail_detail
        /// </summary>
        /// <returns></returns>
        public static DataTable CreateShopBillSubDetail()
        {
            DataTable table = new DataTable();
            table.Columns.Add("BillDetailId", typeof(int));
            table.Columns.Add("DetailName", typeof(string));
            table.Columns.Add("Spec", typeof(string));
            table.Columns.Add("Num", typeof(int));
            table.Columns.Add("UnitPrice", typeof(double));
            table.Columns.Add("Count", typeof(double));
            table.Columns.Add("Area", typeof(double));
            return table;
        }
        /// <summary>
        /// 产品金额统计table
        /// </summary>
        /// <returns></returns>
        public static DataTable CreateProductPrice()
        {
            DataTable table = new DataTable();
            table.Columns.Add("ProductName", typeof(string));
            table.Columns.Add("ProductNum", typeof(int));
            table.Columns.Add("ProductArea", typeof(double));
            table.Columns.Add("Price", typeof(double));
            return table;
        }
        /// <summary>
        /// 开始和结束时间
        /// </summary>
        /// <returns></returns>
        public static DataTable CreateStartAndEndTime()
        {
            DataTable table = new DataTable();
            table.Columns.Add("StartTime", typeof(DateTime));
            table.Columns.Add("EndTime", typeof(DateTime));
            return table;
        }

        /// <summary>
        /// 商户及其未结单金额
        /// </summary>
        /// <returns></returns>
        public static DataTable CreateShopBillNoPay()
        {
            DataTable table = new DataTable();
            table.Columns.Add("ShopName", typeof(string));
            table.Columns.Add("Price", typeof(double));
            return table;
        }
    }
}
